<?php $reviews = $this->requestAction('/reviews/index/user',array('vars'=>true,'named'=>array('user'=>$user['User']['slug'],'limit'=>3)));?>

<?php if($id == $session->read('Auth.User.id')){?>
		<?php $title = __('Your Reviews',true)?>
		<?php $urlParam = "myReviews"?>
	<?php }else{?>
		<?php $title = sprintf(__('Reviews By %s',true),$user['User']['username']);?>
		<?php $urlParam = "userReviews"?>
	<?php }?><div class="clear"></div>
<?php if(!empty($reviews))
{?>
	<h3>
		<span class="fl"><?php echo $title?></span>
		<span class="fr all">
			<?php echo $html->link(__('All Reviews'),SiteUrl::getUrl($urlParam,array($user['User']['username'])));?>
		</span>
	<div class="clear"></div>
	</h3>

	<?php echo $this->element("reviews",array('reviews'=>$reviews,'view_type'=>cr('ReviewConfig.view_type')))?>
	<?php
	if(empty($reviews))
	{?>	
		<h3><?php echo __('No Review has been added yet');?></h3>
	<?php
 	}?>
	
<?php }?>